package com.driver.enums;

import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @description 有效标识枚举类
 */
public enum Valid implements IEnum<Integer> {

    VALID(1, "有效"),
    INVALID(0, "无效");

    @JsonValue
    private final Integer code;

    private final String message;

    Valid(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public Integer getValue() {
        return code;
    }
}
